namespace SmartMathLibrary
{
    /// <summary>
    /// Interface to implement a TaylorSeriesComponent class.
    /// </summary>
    public interface ITaylorSeriesComponent
    {
        /// <summary>
        /// Solves the component at the specified position x.
        /// </summary>
        /// <param name="x">The specified position x.</param>
        /// <returns>The value of the specified position x.</returns>
        double SolveAt(double x);

        /// <summary>
        /// Gets or sets the function about point a or x0 of the series.
        /// </summary>
        /// <value>The function about point a or x0 of the series.</value>
        double A { get; set; }

        /// <summary>
        /// Gets or sets the exponent of the series component.
        /// </summary>
        /// <value>The exponent of the series component.</value>
        double Exponent { get; set; }

        /// <summary>
        /// Gets or sets the coefficient of the series component.
        /// </summary>
        /// <value>The coefficient of the series component.</value>
        double Coefficient { get; set; }

        /// <summary>
        /// Copies the current instance.
        /// </summary>
        /// <returns>A copy of the current instance.</returns>
        TaylorSeriesComponent Copy();

        /// <summary>
        /// Compares the current component with another one.
        /// </summary>
        /// <param name="compare">The component to compare.</param>
        /// <returns>True if the components are even otherwise, false.</returns>
        bool CompareTo(TaylorSeriesComponent compare);
    }
}